const {ipcMain} = require('electron');
const db = require('../service/db');

function registerHISTORYIpc() {

    // 获取打印历史列表
    ipcMain.handle('history:getList', async (event, {limit, offset}) => {
        return await db.getHistoryList(limit, offset);
    });

    // 获取历史记录总数
    ipcMain.handle('history:getCount', async () => {
        return await db.getHistoryCount();
    })


}

module.exports = registerHISTORYIpc;